// components/detail/detail.ts
Component({

  /**
   * 组件的属性列表
   */
  properties: {
    goodsObj: {
      type: Object,
      value: {
        id: "",
        name: "",
        image: "",
        price: "",

      }
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    num:1
  },

  /**
   * 组件的方法列表
   */
  methods: {
    handleAddCart(e) {
  
      this.triggerEvent('handleAddCart',e)
    },

    handleCloseDetail() {
      this.triggerEvent('handleCloseDetail')
    },
    handleChange(e){
      const num = e.detail
      this.setData({
        num
      })
    }

  }
})